package com.smile.service.entity.media;


import com.fasterxml.jackson.annotation.JsonProperty;

public class StorageConfigGetData {

    @JsonProperty("output")
    private StorageOutput output;

    @JsonProperty("result")
    private int result;

    // Getters and Setters
    public StorageOutput getOutput() {
        return output;
    }

    public void setOutput(StorageOutput output) {
        this.output = output;
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }


    @Override
    public String toString() {
        return "StorageConfigGetData{" +
                "output=" + output +
                ", result=" + result +
                '}';
    }

    public static class StorageOutput {

        @JsonProperty("bucket")
        private String bucket;

        @JsonProperty("credentials")
        private StorageCredentials credentials;

        @JsonProperty("endpoint")
        private String endpoint;

        @JsonProperty("object_key_prefix")
        private String objectKeyPrefix;

        @JsonProperty("provider")
        private String provider;

        @JsonProperty("region")
        private String region;

        // Getters and Setters
        public String getBucket() {
            return bucket;
        }

        public void setBucket(String bucket) {
            this.bucket = bucket;
        }

        public StorageCredentials getCredentials() {
            return credentials;
        }

        public void setCredentials(StorageCredentials credentials) {
            this.credentials = credentials;
        }

        public String getEndpoint() {
            return endpoint;
        }

        public void setEndpoint(String endpoint) {
            this.endpoint = endpoint;
        }

        public String getObjectKeyPrefix() {
            return objectKeyPrefix;
        }

        public void setObjectKeyPrefix(String objectKeyPrefix) {
            this.objectKeyPrefix = objectKeyPrefix;
        }

        public String getProvider() {
            return provider;
        }

        public void setProvider(String provider) {
            this.provider = provider;
        }

        public String getRegion() {
            return region;
        }

        public void setRegion(String region) {
            this.region = region;
        }


        @Override
        public String toString() {
            return "StorageOutput{" +
                    "bucket='" + bucket + '\'' +
                    ", credentials=" + credentials +
                    ", endpoint='" + endpoint + '\'' +
                    ", objectKeyPrefix='" + objectKeyPrefix + '\'' +
                    ", provider='" + provider + '\'' +
                    ", region='" + region + '\'' +
                    '}';
        }
    }

    // 存储凭证类
    public static class StorageCredentials {

        @JsonProperty("access_key_id")
        private String accessKeyId;

        @JsonProperty("access_key_secret")
        private String accessKeySecret;

        @JsonProperty("expire")
        private long expire; // 凭证有效期（秒）

        @JsonProperty("security_token")
        private String securityToken;

        // Getters and Setters
        public String getAccessKeyId() {
            return accessKeyId;
        }

        public void setAccessKeyId(String accessKeyId) {
            this.accessKeyId = accessKeyId;
        }

        public String getAccessKeySecret() {
            return accessKeySecret;
        }

        public void setAccessKeySecret(String accessKeySecret) {
            this.accessKeySecret = accessKeySecret;
        }

        public long getExpire() {
            return expire;
        }

        public void setExpire(long expire) {
            this.expire = expire;
        }

        public String getSecurityToken() {
            return securityToken;
        }

        public void setSecurityToken(String securityToken) {
            this.securityToken = securityToken;
        }


        @Override
        public String toString() {
            return "StorageCredentials{" +
                    "accessKeyId='" + accessKeyId + '\'' +
                    ", accessKeySecret='[PROTECTED]'" +
                    ", expire=" + expire +
                    ", securityToken='" + securityToken + '\'' +
                    '}';
        }
    }

}

// 存储输出配置类
